<?php
/**
 * xysc users Version1.0
 * ==================================
 * Copy 2016-2017
 * Web:www.xjh7.com
 * ==================================
 * Author:lj
 * Date:2016-03-09
*/

	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>轩辕商城-后台</title>
<link rel="stylesheet" type="text/css" href="<?php echo backweb_CSS_URL;?>index.css" />
<link rel="stylesheet" type="text/css" href="<?php echo backweb_CSS_URL;?>common.css" />
<script type="text/javascript" src="<?php echo backweb_JS_URL;?>jquery.js"></script>
<script type="text/javascript">
	function isTop()
	{
	
		if($("#pages_parent").val()==0)
		{		
			$("#pages_address").attr("value","#");
			$("#pages_address").attr("disabled",true);
		}
		else
		{
			$("#pages_address").attr("value","");
			$("#pages_address").attr("disabled",false);
		}
	}
</script>
</head>
<body onload="isTop()">

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="#">首页</a></li>
			<li><a href="#">系统管理</a></li>
			<li><a href="#">菜单管理</a></li>
			<li><a href="#">新增菜单</a></li>
		</ul>
	</div>
	
	<form  name="form1" method="post" action="./index.php?r=backweb/menu/add" >
		<div id="table" >
     	   <div>
             <table class="list_table mt10">
			 <tr>
				 <td class="td_center wh100">菜单名称：</td>
				 <td>
				     <input type="text" name="pages_name" id="pages_name" class="input-text"/>
				 </td>		
			  </tr>
			  <tr  class="mt25">
			  	<td class="td_center">父级菜单：</td>
				 <td>
				    <div class="select_border"> 
                        <div class="select_containers "> 
						     <select id="pages_parent" name="pages_parent" class="select" onchange="isTop()">	
						       <option value="0">无</option>	
						       	<?php foreach($info as $v){ ?>
								<option value="<?php echo $v->pages_id;?>" ><?php echo $v->pages_name; ?></option>
								<?php }?>							     		
						     </select>
				   		  </div>
				     </div>
				 </td>
			  </tr>	
			   <tr>
				 <td class="td_center wh100">菜单地址：</td>
				 <td>
				     <input type="text" name="pages_address" id="pages_address" class="input-text wh500"/>
				 </td>		
			  </tr>	
			   <tr>
				 <td class="td_center wh100">菜单顺序：</td>
				 <td>
				     <input type="text" name="pages_order" id="pages_order" class="input-text wh100"/>
				 </td>		
			  </tr>			
			  <tr>
				  <td class="td_center">
				    <input type="submit" name="btsave" id="btsave" value="提交" class="btn btn82 btn_save ml25" />				
				 </td>
				 <td>
				   <input type="reset" value="重置" class="btn btn82 btn_res ml10" />
				</td>
			 </tr>
			 </table>
          </div>
        </div>       
    </form>    
	
</body>
</html>